home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
apendixb.lha
/
appendixb
/
abs.h
next >
Wrap
Text File
|
1993-08-08
|
349b
|
22 lines
/ define a function for each of the various
/ basic types which returns the absolute value.
ifndef ABS_H
define ABS_H
verload abs;
define defabs(typex) \
inline typex abs(typex &a) \
{ \
if (a >= 0) return a; \
else return -a; \
}
efabs(char)
efabs(short)
efabs(int)
efabs(long)
efabs(float)
efabs(double)
endif /* ABS_H */